package com.kuicattle.kc.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "主页")
@RestController
@RequestMapping("/")
public class HomeController {

    @ApiOperation(value = "测试")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "is", value = "是否成功", required = true)
    })
    @GetMapping("/test")
    public ResponseWrapper Test(boolean is) {
        if (is) {
            return ResponseWrapper.markSuccessButNoData();
        }
        return ResponseWrapper.markError();
    }

}
